package felix.rule.js.script;

import com.google.common.util.concurrent.ListenableFuture;
import felix.rule.js.util.ListeningExecutor;

import java.util.UUID;

public interface JsInvokeService {

    ListenableFuture<UUID> eval(String scriptBody);

    ListenableFuture<Object> invokeFunction(UUID scriptId, Object... args);

    ListenableFuture<Void> release(UUID scriptId);

    ListeningExecutor getJsExecutor();
}
